/*
    ***** BEGIN LICENSE BLOCK *****
    
    Copyright © 2011 Center for History and New Media
                     George Mason University, Fairfax, Virginia, USA
                     http://zotero.org
    
    This file is part of Zotero.
    
    Zotero is free software: you can redistribute it and/or modify
    it under the terms of the GNU Affero General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.
    
    Zotero is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Affero General Public License for more details.
    
    You should have received a copy of the GNU Affero General Public License
    along with Zotero.  If not, see <http://www.gnu.org/licenses/>.
    
    Parts of this code are derived from mozilla.org code.
    
    The Initial Developer of this Original Code is Netscape Communications Corporation.
    Portions created by the Initial Developer are Copyright (C) 1998-1999
    the Initial Developer. All Rights Reserved.
    
    ***** END LICENSE BLOCK *****
*/

#up {
	list-style-image: url('chrome://zotero/skin/citation-up.png');
}

#up[disabled="true"] {
	list-style-image: url('chrome://zotero/skin/citation-up-gray.png');
}

#down {
	list-style-image: url('chrome://zotero/skin/citation-down.png');
}

#down[disabled="true"] {
	list-style-image: url('chrome://zotero/skin/citation-down-gray.png');
}


#add {
	list-style-image: url('chrome://zotero/skin/citation-add.png');
}

#add[disabled="true"] {
	list-style-image: url('chrome://zotero/skin/citation-add-gray.png');
}

#remove {
	list-style-image: url('chrome://zotero/skin/citation-delete.png');
}

#remove[disabled="true"] {
	list-style-image: url('chrome://zotero/skin/citation-delete-gray.png');
}

#citation-buttons > toolbarbutton
{
	margin: 2px 0 2px 4px !important;
	padding: 0 !important;
}

#citation-buttons > toolbarbutton > .toolbarbutton-text
{
	margin: 0 !important;
	padding: 0 !important;
}

#tree-locator {
	width: 60px;
}

#item-locator {
	max-width:100px;
}

#editor {
	margin-top: 10px;
	max-height: 100px;
}

#item-list richlistitem image {
	margin-right: 5px;
	height: 16px;
	vertical-align: top;
}

.citation-dialog.title {
	margin: 0;
	font-weight: 600;
	overflow: hidden;
}

.citation-dialog.info {
	margin: 0;
	overflow: hidden;
}
.citation-dialog.info > label {
	margin: 0;
	padding: 0;
	width: auto !important;
	white-space: pre;
}

.citation-dialog .zotero-bubble-input {
	outline: none;
	min-width: 10px;
	width: 10px;
	border: none !important;
	max-width: 700px; /* Entire line of the editor */
	box-sizing: border-box; 
	height: 15px;
	margin: 0;
	/* Keep the background and text color unchanged in dark mode */
	background-color: transparent !important;
	color: black;
	background-image: none !important;
	padding: 0;
	margin-inline: 2px;
}

span.zotero-bubble-input {
	/* Same left padding as for input */
	padding-left: 4px;
	/* Make last white space be counted during width calculations */
	white-space: pre;
}

#dragged-bubble {
	opacity: 0.3;
}

.citation-dialog.bubble {
	border-radius: 8px;
	background-color: #dee7f8;
	border-style: solid;
	border-width: 1px;
	border-color: #a8c0ec;
	padding: 0 6px;
	margin: 3px 2px 0 2px;
	display: inline-block;
	white-space: nowrap;
	line-height: normal;
	color: #000;
	-moz-user-select: none;
	cursor: pointer;
	height: 16px;
}


.citation-dialog.bubble:hover {
	background-color: #bbcef1;
	border-color: #6d95e0;
}

.citation-dialog.bubble[selected="true"] {
	border-radius: 8px !important;
	background-color: #598bec;
	color: #fff;
}

.citation-dialog.main {
	margin: 0;
	padding: 0;
	padding-top: 0;
	padding-bottom: 0;
	background: white;
	border-radius: 10px;
}

.citation-dialog.iframe {
	margin-left: 4px;
	height: 9999px;
}

.citation-dialog.editor {
	margin: 0;
	font: -moz-field;
	outline: none;
	line-height: 2em;
	width: 700px; /* initial editor width - adjusted after dom load */
	min-height: 28px;
	font-size: 13px;
	background: white;
	color: black;
}

.citation-dialog.editor::selection {
	color: var(--color-accent-text);
	background: var(--color-accent);
}

.citation-dialog.icons {
	display: flex;
	align-items: center;
	flex-direction: column;
	justify-content: center;
	width: 36px;
}

.citation-dialog.entry {
	max-width: 800px;
	min-width: 800px;
	-moz-window-dragging: drag;
}

.citation-dialog.deck {
	-moz-window-dragging: no-drag;
}

.citation-dialog.progress-meter[value] {
	visibility: visible;
}

.citation-dialog .accept-button {
	list-style-image: url("chrome://zotero/skin/20/universal/arrow-right.svg");
	fill: #0000008c; /* hardcoded fill-secondary from light theme */
}

.citation-dialog .accept-button:hover {
	background-color: #0000000d; /* hardcoded fill-quinary from light theme */
}

.zotero-spinner-16 {
	fill: #0000008c; /* hardcoded fill-secondary from light theme */
	background: url("chrome://zotero/skin/16/light/loading.svg") no-repeat center/contain;
}

.citation-dialog.item {
	-moz-user-focus: normal;
	padding: 3px 5px 3px 10px;
	font-size: 12px;
}

.citation-dialog.item span {
	white-space: pre;
}

.citation-dialog.item:not(:last-child), .citation-dialog.separator:not(:last-child) {
	border-style: solid;
	border-width: 0 0 1px 0;
	border-color: #BBB;
}

.citation-dialog.separator {
	font-size: 12px;
	font: -moz-field;
	-moz-user-focus: ignore;
	color: var(--fill-secondary);
}

richlistitem[selected="true"] {
	background: Highlight !important;
	color: HighlightText !important;
}

.citation-dialog.reference-panel {
	margin: 0;
	padding: 0;
	border: none;
	background: white;
	opacity: 0.9;
	-moz-user-focus: ignore;
}

.citation-dialog.reference-panel:is(panel, menupopup)::part(content) {
	display: contents;
}

.citation-dialog.reference-list {
	margin: 0;
	padding: 0;
	max-height: 100%;
	-moz-user-focus: ignore;
}

#zotero-icon {
	list-style-image: url("chrome://zotero/skin/zotero-new-z-16px.png");
	padding: 0;
	margin: 0;
}

/* Add cursor and hover/active effects to make the Z icon act like a button */
#zotero-icon:not([disabled]) {
	cursor: pointer;
	padding: 5px 4px 5px 5px;
}

#zotero-icon:not([disabled]):hover,
#zotero-icon:not([disabled]):focus,
#zotero-icon[open="true"]:not([disabled]) {
	background: #f2f2f2;
}


#zotero-icon:not([disabled])::after {
	background: url("searchbar-dropmarker@2x.png") no-repeat center / contain;
	display: inline-block;
	content: "";
	width: 5px;
	height: 8px;
	margin-left: 1px;
}

#citation-properties:is(panel, menupopup)::part(content) {
	padding: 10px;
	max-width: 450px;
}

#citation-properties #suppress-author {
	-moz-user-focus: normal;
}

#citation-properties-title, #citation-properties-info {
	padding-left: 0;
	padding-right: 0;
	margin-left: 0;
	margin-right: 0;
}

#citation-properties-title {
	font-weight: 600;
}

#citation-properties-grid {
	display: grid;
	align-items: center;
	grid-template-columns: max-content 1fr;
}

.zotero-simpleEditor {
	box-sizing: border-box;
	font-size: 14px;
	height: 100%;
}

.zotero-simpleEditor-content {
	box-sizing: border-box;
	outline: 0;
	overflow-y: auto;
	padding: 36px 10px 10px 10px;
}

.zotero-simpleEditor-actionbar {
	background-color: #fff;
	border-bottom: 1px solid rgba(10, 10, 10, 0.1);
	position: fixed;
	width: 100%;
}

.zotero-simpleEditor-button {
	background-color: transparent;
	border: none;
	cursor: pointer;
	height: 30px;
	outline: 0;
	width: 30px;
	vertical-align: bottom;
}

.zotero-simpleEditor-button-selected {
	background-color: #f0f0f0;
}

panel button .button-text {
	margin: 0 !important;
}

window.citation-dialog {
	max-width: 800px;
	min-width: 800px;
}

.aria-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	border: 0;
}

window#add-citation-dialog, window#edit-bibliography-dialog {
	min-height: 600px;
}

window#add-citation-dialog dialog, window#edit-bibliography-dialog dialog {
	max-height: 100vh;
}
